﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using rmyy.RepositoryFactory;
using rmyy.IRepository;
namespace rmyy.IService
{
    public interface IBaseService<T> where T:class,new()
    {
        IQueryable<T> LoadEntities(Expression<Func<T, bool>> whereLambda);
        IQueryable<T> LoadPageEntities<s>(int pageIndex, int pageSize, out int totalCount, Expression<Func<T, bool>> whereLambda, Expression<Func<T, s>> orderLambda, bool isAsc);
        T AddEntity(T entity);
        bool DelEntity(T entity);
        bool EditEntity(T entity);
        DBSession CurrentDBSession{get;}
        IBaseRepository<T> CurrentRepository { get; set; }

    }
}
